home *** CD-ROM | disk | FTP | other *** search
-
-
-
- mmmmddddSSSSeeeennnndddd((((3333ddddmmmm)))) mmmmddddSSSSeeeennnndddd((((3333ddddmmmm))))
-
-
-
- NNNNAAAAMMMMEEEE
- mdSend - send out MIDI data
-
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////mmmmiiiiddddiiii....hhhh>>>>
-
- iiiinnnntttt mmmmddddSSSSeeeennnndddd((((MMMMDDDDppppoooorrrrtttt ppppoooorrrrtttt,,,, MMMMDDDDeeeevvvveeeennnntttt ****bbbbuuuuffff,,,, iiiinnnntttt ccccoooouuuunnnntttt))))
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- mmmmddddSSSSeeeennnndddd writes MIDI events to the interface indicated by _p_o_r_t. _b_u_f points
- to a user-allocated array containing at least _c_o_u_n_t MDevent structures.
- mdSend will always transmit _c_o_u_n_t events; it will block if necessary
- waiting for the interface event queue to drain.
-
- The event structure contains the MIDI message to be transmitted in the
- _m_s_g field (see mmmmddddIIIInnnnttttrrrroooo((((3333ddddmmmm)))) for details on the MDevent structure). If
- the application wishes to transmit a system exclusive message, it should
- set msg[0] to MD_SYSEX (0xF0), point _s_y_s_e_x_m_s_g to the block of sysex data,
- and set _m_s_g_l_e_n to the length of the sysex data. It is possible for a
- system exclusive message to be transmitted in multiple segments, but the
- first byte in the first sysexmsg chunk must contain MD_SYSEX, and the
- last byte in the last sysexmsg chunk must be MD_EOX.
-
- The current implementation of the library cannot properly merge multiple
- streams of system exclusive data transmitted to the same interface. For
- best results no more than one port should transmit system exclusive data
- to an interface at any given time.
-
- The stamp field of the event governs when that event will be transmitted.
- Event stamps must be greater than or equal to 0. The interpretation of a
- stamp depends on the stamping mode of the port (see mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))).
- If the port's stamp mode is MD_NOSTAMP, the event will be transmitted
- immediately. If the stamp mode is MD_RELATIVESTAMP or MD_DELTASTAMP, the
- stamp value is in milliseconds. In MD_RELATIVETICKS or MD_DELTATICKS
- mode, the stamp value is in ticks. When in one of the relative stamp
- modes, the time stamps of the events must increase monotonically. In
- these modes (MD_RELATIVETICKS and MD_RELATIVESTAMP), if an application
- sends an event whose timestamp is less than that of its predecessor, the
- event will be transmitted immediately.
-
- If the MIDI interface's event queue is full when mdSend is called, mdSend
- will block until space if available. To avoid blocking, and application
- can call sssseeeelllleeeecccctttt((((3333)))) (see mmmmddddGGGGeeeettttFFFFdddd).
-
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- mdSend returns the number of messages actually sent on success or -1
- times the number of messages sent on error. Note that a return value of
- 0 indicates that an error occurred and that no messages were sent. The
- following error codes are possible:
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- mmmmddddSSSSeeeennnndddd((((3333ddddmmmm)))) mmmmddddSSSSeeeennnndddd((((3333ddddmmmm))))
-
-
-
- ENXIO - A bad MDport was passed to mdSend
-
- EFAULT - An invalid address was passed to the MIDI driver
-
- EINVAL - An undefined operation was called.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- mmmmddddIIIInnnnttttrrrroooo((((3333ddddmmmm)))), mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm)))), mmmmddddGGGGeeeettttFFFFdddd, sssseeeelllleeeecccctttt((((2222))))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-